import request from '@/utils/request'

// 查询媒资列表
export function listMedia(query) {
    return request({
        url: '/media/media/list',
        method: 'get',
        params: query
    })
}

// 查询媒资详细
export function getMedia(id) {
    return request({
        url: '/media/media/' + id,
        method: 'get'
    })
}

// 新增媒资
export function addMedia(data) {
    return request({
        url: '/media/media',
        method: 'post',
        data: data
    })
}

// 修改媒资
export function updateMedia(data) {
    return request({
        url: '/media/media',
        method: 'put',
        data: data
    })
}

// 删除媒资
export function delMedia(id) {
    return request({
        url: '/media/media/' + id,
        method: 'delete'
    })
}

